<template>
  <div class="baseB">
    BBB
    <button @click="ClickSend">send</button>
  </div>
</template>

<script>
import Bus from '@/utils/EventBus';
export default {
    methods:{
        ClickSend(){
            //触发事件，发送消息
            Bus.$emit("sendMsg","hello,good")
        }
    }

}
</script>

<style>
    .baseB{
        width: 200px;
        height: 150px;
        padding: 10px;
        margin-top: 10px;
        border: 3px solid black;
        border-radius: 5px;
        font-size: 20px;
    }
</style>